

diary 'flyfly.txt'
diary on;
t= 0:1:360;
map =zeros(70,70);

vv = zeros(50,50,50);
plan=zeros(1,7*5);


hash1 = zeros(200,1);
T = zeros(100);
N = zeros(10);
%% 开始循环过程
for M = 200000:-1000:50000
    
    pandun  = 0;
    for  t2 = 40:2:300
    for V1 =60:1:140
        for V2=60:1:120
            for V3 = 60:1:120
                nn  = 3;
               
                t1   = 0:0.1:t2;
                lmax1 = distance(nn);
                lmax2 = distance(10-nn);
                [red_f1x, red_f1y]= drop_the_air([0,M/2],[50000,M/7]);
                [red_f2x, red_f2y]= drop_the_air([0,M/2],[50000,M*9/14]);
                [t1,xxyy] = ode23( @(t,y)fly_the_air2(t,y,L1,V1,V2,V3,1,M),t1,[0,M/2,50000,M/7,50000,M*9/14,red_f1x,red_f1y,red_f2x,red_f2y]);
                [status ,tt] = check_status2(xxyy,M,lmax1);
                
                tt2 = t2:0.1:360;
                lastout = xxyy(length(xxyy),:);
                [red_f3x, red_f3y]= drop_the_air( xxyy(length(xxyy),1:2),xxyy(length(xxyy),3:4) );
                [red_f4x, red_f4y]= drop_the_air( xxyy(length(xxyy),1:2),xxyy(length(xxyy),5:6) );
                %  status 的状态
                %  0 - 未知
                % 1 - 拦截成功
                % -1  ： 曲率不满足条件
                % 2 ： 突围成功
                [tt2,xxyy2] = ode23( @(t,y)fly_the_air3(t,y,L1,V1,V2,1,M),tt2,[lastout(1),lastout(2),lastout(7),lastout(8),lastout(8),lastout(10),red_f1x,red_f1y,red_f2x,red_f2y]);
                [status2 ,tst2] = check_status3(xxyy2,M,[lmax1,lmax2]);
                
                
                if(status2 == 2 || status ==2)
                    disp(M);
                    pandun = 1;
                    disp(status2);
                    disp("----------")
                    hash1(M/1000)=1;
                    break
                end
                
                
                
                
                
                
            end
            if pandun == 1
                break;
            end
        end
        if pandun == 1
            break;
        end
        
    end
      if pandun == 1
            break;
        end
        
    end
    
    
    
end

diary off;
save("q1113.mat");